package com.itheima;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import io.seata.spring.annotation.datasource.EnableAutoDataSourceProxy;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @Author：shenkunlin
 * @date： 2021/8/20 10:48
 * @Description：
 ***/
@SpringBootApplication
@MapperScan(basePackages = "com.itheima.media.mapper")
@EnableFeignClients(basePackages = "com.itheima.*.feign")
//创建代理数据源
@EnableAutoDataSourceProxy
public class WeMediaApplication {

    public static void main(String[] args) {
        SpringApplication.run(WeMediaApplication.class,args);
    }

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
